package com.dream.inspect.modules.business.dao;

import com.dream.inspect.modules.business.entity.SuperviseStandardEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 督察问题标准表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-06-16 17:04:52
 */
public interface SuperviseStandardDao extends BaseMapper<SuperviseStandardEntity> {
    List<Map<String, Object>> getList(@Param("code") String code, @Param("level") String level, @Param("name") String name);

    List<Map<String, Object>> queryTempletSmall(@Param("templetId") Long templetId,@Param("name") String name);

    List<Map<String, Object>> queryCheckListByEjCode(@Param("templetId") String templetId, @Param("code") String code, @Param("level") int level);
    List<Map<String, Object>> getCommonCheck(@Param("m") Map<String, Object> map);

    /**
     * 获取问题数据
     *
     * @param code
     * @param level
     * @param name
     * @return
     */
    List<SuperviseStandardEntity> findListByCodeAndLevel(@Param("code") String code, @Param("level") String level, @Param("name") String name);

    /**
     * 根据id获取问题列表
     *
     * @param params
     * @return
     */
    List<SuperviseStandardEntity> findListByIds(Map<String, Object> params);

    List<SuperviseStandardEntity> findListByParentId(Map<String, Object> params);

    /**
     * 获取最大的code
     *
     * @param code
     * @param level
     * @return
     */
    List<String> findMaxCodeByLevelAndCode(@Param("code") String code, @Param("level") String level);

    List<Long> getNoQuestionIdList(@Param("tId") String tId, @Param("rId") Long rId, @Param("dcxlId") String dcxlId);

    /**
     * 查询所有
     *
     * @return
     */
    List<SuperviseStandardEntity> findAllListDesc();

}
